package com.ant.storage.controller;

import com.ant.storage.common.PageRecv;
import com.ant.storage.common.ResultPage;
import com.ant.storage.pojo.OtherEnter;
import com.ant.storage.service.IOtherEnterService;
import com.ant.storage.common.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/OtherEnter")
@Api(tags = "其他入库单接口")
/**
 * 其他入库接口
 */
public class OtherEnterController {
    @Autowired
    private IOtherEnterService otherEnterService;

    @ApiOperation(value = "添加其他入库单")
    @PostMapping("/addOtherEnter")
    public ResultVo addOtherEnter(@RequestBody OtherEnter otherOut) throws NoSuchFieldException {
        return otherEnterService.addOtherEnter(otherOut);
    }

    @ApiOperation(value = "查询其他入库单")
    @PostMapping("/queryOtherEnter")
    public ResultPage queryOtherEnter(@RequestBody PageRecv<OtherEnter> pageRecv){
        return otherEnterService.queryOtherEnter(pageRecv);
    }
}
